<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>定义变量和方法</title>
</head>
<body>
	
	<%! 
	 int a = 10;
	 String b = "zhangsan";
	 int c = 2;
	%>
	
    <%= a+c  %>
    <br>
    <%= b  %>
    <br>
    <%
    	int d = 20;
    	out.print(d);
    
    %>
    
    <!-- http://localhost:8080/Chapter5/page3.jsp?username=admin -->
     <%
     	session.setAttribute("eamil", "12345@qq.com");
     	String username = request.getParameter("username");
     	String email = (String)session.getAttribute("eamil");
     	out.print("<br>");
     	out.print("username="+username);
     	out.print("<br>");
     	out.print("email="+email);
     	
     %>
    
    
    
</body>
</html>